当前位置: 首页> 函数类别大全> date_parse_from_format

date_parse_from_format

获取有关根据指定格式格式化的给定日期的信息
名称:date_parse_from_format
分类:日期和时间
所属语言:php
一句话介绍:根据指定的格式返回带有关于指定日期的详细信息的关联数组。

定义和用法

date_parse_from_format() 函数根据指定的格式返回包含指定日期信息的关联数组。

实例

根据指定的格式返回一个包含指定日期信息的关联数组:

<?php
print_r(date_parse_from_format("mmddyyyy","05122013"));
?>

亲自试一试

语法

date_parse_from_format(format,date);
参数 描述
format 必需。规定格式(date_create_from_format() 接受的格式)。
date 必需。指定日期,字符串值。
同类函数
  •  DateTime::add的别名 : 给一个 DateTime 对象增加一定量的天,月,年,小时,分钟 以及秒。 date_add

    date_add

    DateTime::add的别名:给一个
  •  返回给定日期和位置的日出时间 date_sunrise

    date_sunrise

    返回给定日期和位置的日出时间
  •  返回当前的Unix时间戳,以及微秒数 microtime

    microtime

    返回当前的Unix时间戳,以及微秒数
  •  返回关联数组,其中包含有关给定日期的详细信息 date_parse

    date_parse

    返回关联数组,其中包含有关给定日期的详细
  •  格式化GMT/UTC日期/时间 gmdate

    gmdate

    格式化GMT/UTC日期/时间
  •  DateTime::setTimestamp的别名 - 以 Unix 时间戳的方式设置 DateTime 对象 date_timestamp_set

    date_timestamp_set

    DateTime::setTimesta
  •  DateTime::getTimestamp的别名 - 获取 Unix 时间戳 date_timestamp_get

    date_timestamp_get

    DateTime::getTimesta
  •  解析strftime生成的时间/日期 strptime

    strptime

    解析strftime生成的时间/日期
热门文章